package com.xmx.service.impl;

import com.xmx.pojo.User;
import com.xmx.dao.UserMapper;
import com.xmx.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jianzi
 * @since 2022-08-10
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User userlogin(String username, String password) {
        return userMapper.userlogin(username, password);
    }

    @Override
    public int userregist(User user) {
        return userMapper.userregist(user);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public int delete(Integer uid) {
        return userMapper.delete(uid);
    }

    @Override
    public int update(Integer uid) {
        return userMapper.update(uid);
    }

    @Override
    public User findbyid(Integer uid) {
        return  userMapper.findbyid(uid);
    }
}
